package com.ggh.jinjilive.ui.home.video.videoplay;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProvider;

import com.blankj.utilcode.util.LogUtils;
import com.ggh.jinjilive.BaseApplication;
import com.ggh.jinjilive.R;
import com.ggh.jinjilive.databinding.FragmentVideoBinding;
import com.ggh.jinjilive.databinding.FragmentVideoPlayBinding;
import com.ggh.jinjilive.mobile.home.video.VideoList;
import com.ggh.jinjilive.ui.BaseFragment;
import com.ggh.jinjilive.views.live.v2.V2PULLLiveRoom;
import com.google.gson.Gson;
import com.tencent.live2.V2TXLiveDef;

public class VideoPlayFragment extends BaseFragment<FragmentVideoPlayBinding> {
    private VideoPlayViewModel videoPlayViewModel;
    //视频信息
    private VideoList videoList;
    //直播拉流的视频播放器
    private V2PULLLiveRoom v2PULLLiveRoom;

    public VideoPlayFragment(VideoList videoList){
        this.videoList = videoList;
    }


    @Override
    public void onCreate(@Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        BaseApplication.getInstance().getAppComponent().doInjectionMain(this);
        videoPlayViewModel = new ViewModelProvider(this,viewModelFactory).get(VideoPlayViewModel.class);
    }


    @Override
    public int initContentView(LayoutInflater inflater, @Nullable @org.jetbrains.annotations.Nullable ViewGroup container, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
        return R.layout.fragment_video_play;
    }

    @Override
    public void initView() {
        super.initView();
        binding.cs.setText(videoList.getNickname());
    }

    @Override
    public void initData() {
        super.initData();

    }
}
